export default {
  data () {
    return {
      loginUserFormRules: {
        username: [
          { required: true, message: '请输入用户名', trigger: 'blur' }
        ],
        password: [
          { required: true, message: '请输入密码', trigger: 'blur' }
        ]
      }
    }
  },
  methods: {
    submitForm (formRef, func) {
      this.$refs[formRef].validate((valid) => {
        if (valid) {
          func()
        } else {
          return false
        }
      })
    }
  }
}
